package com.i8office.android.zhihuixinwu.ui.schedule;

import com.cyan.tools.callback.SimpleCallback;
import com.i8office.android.zhihuixinwu.module.contract.CalendarContract;
import com.i8office.android.zhihuixinwu.module.model.CalendarModel;
import com.i8office.android.zhihuixinwu.module.presenter.BasePresenterImpl;


public class SchedulePresenter extends BasePresenterImpl<CalendarContract.ScheduleView> implements CalendarContract.SchedulePresenter {
    CalendarContract.Model model;

    public SchedulePresenter(CalendarContract.ScheduleView view) {
        super(view);
        model = new CalendarModel();
    }

    @Override
    public void checkInGroup() {
        addDisposable(model.checkInGroup(new SimpleCallback<CheckInGroup>(mView) {
            @Override
            public void requestError(String msg) {
                super.requestError(msg);
                mView.toast(msg);
            }

            @Override
            public void requestSuccess(CheckInGroup data) {
                mView.showCheckInGroup(data);
            }
        }));
    }
}
